package org.lboot.flow.test;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.lboot.core.auth.AuthService;
import org.lboot.core.domain.ResponseDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("test")
@Api(tags = "测试接口")
@AllArgsConstructor
public class FlowTestController {
    AuthService authService;
    @PostMapping("login")
    @ApiOperation(value = "快速登录")
    public ResponseDTO<Object> qLogin(@RequestParam("id") String id){
        authService.doLogin(id);
        return ResponseDTO.succData(
                authService.getToken()
        );
    }
}
